package com.net.xpay.common.dao.stat;


import com.net.xpay.common.domain.stat.UserTransStat;
import com.net.xpay.common.model.UserTransStatMonthModel;
import com.net.xpay.common.model.UserTransStatSumModel;
import com.net.xpay.common.model.UserUnionTransStatResultModel;
import com.net.xpay.common.model.search.UserUnionTransStatSearchModel;
import com.net.common.dao.Page;
import com.net.common.dao.PagedMapper;
import com.net.common.annotation.DataCommon;
import com.net.xpay.core.model.UserTransStatSearchModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@DataCommon
@Repository
public interface UserTransStatMapper extends PagedMapper<Long, UserTransStat> {


    List<UserTransStat> search(@Param("searchModel")UserTransStatSearchModel searchModel, @Param("page") Page page);

    long searchCount(@Param("searchModel") UserTransStatSearchModel searchModel);

    List<UserTransStatMonthModel> sumMonthUserTransStat(@Param("year") Integer year, @Param("month") Integer month, @Param("userId") Long userId);

    List<UserTransStat> list(@Param("searchModel")UserTransStatSearchModel searchModel);

    UserTransStatSumModel sumUserSafePayTransStat(@Param("searchModel") UserTransStatSearchModel searchModel);

    List<UserUnionTransStatResultModel> searchUnion(@Param("searchModel") UserUnionTransStatSearchModel searchModel, @Param("page") Page page);

    long searchUnionCount(@Param("searchModel")UserUnionTransStatSearchModel searchModel);
}
